package com.wjk.kylin.mall.order.feign;

import com.wjk.kylin.mall.common.core.dto.base.DataOutDTO;
import com.wjk.kylin.mall.order.feign.fallback.ProductFeignServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * fallback 和 fallbackFactory 二选一
 *
 */
@FeignClient(value = "mall-product",
//        fallback = ProductFeignServiceFallback.class,
        fallbackFactory = ProductFeignServiceFallbackFactory.class
)
public interface ProductFeignService {
    /**
     * 测试feign远程调用，与远程的RequestMapping地址和方法名一致
     *
     * @return
     */
    @GetMapping("/product/test/demo")
    DataOutDTO<String> demo();
}
